#include<iostream>
#include<cstring>
#include<vector>
#include<map>
#include<cstdio>
#include<algorithm>
#include<string>
#include<string.h>
#include<queue>
#include<math.h>
#include<set>
#include<functional>
using namespace std;
using ull = unsigned long long;
using i128 = __int128_t;
inline int inc(int x,int v,int mod){x+=v;return x>=mod?x-mod:x;}//代替取模+
#define endl '\n'
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int,int> PII;
#define int long long

const int N = 2e5+10;


void solve()
{  
    int n,k,t;
    cin >> n >> k >> t;
    vector<int> a(n+1);
    for(int i = 1; i<= n; i++) cin >> a[i];

    int l = k;
    int r = n + 1;

    auto check = [&](int mid)
    {
        vector<int>arr = a;
        sort(arr.begin() + 1,arr.begin() + mid + 1);
        vector<int>crr = arr;
        for(int i = 1; i <= mid; i ++)
        {
            crr[i] = crr[i] + crr[i - 1];
        }
        vector<int>drr = arr;
        for(int i = 1; i <= mid; i ++)
        {
            drr[i] = drr[i] * drr[i];
        }
        for(int i = 1; i <= mid; i ++)
        {
            drr[i] = drr[i] + drr[i - 1];
        }
        double res = ((double)(drr[k] - drr[0]) / (double)k) - (double)((double)(crr[k] - crr[0]) / (double)k * (double)(crr[k] - crr[0]) / (double)k);
        //cout << res << ' ' << mid << ' ' << crr[k] - crr[0] << endl;
        for(int i = k + 1; i <= mid; i ++)
        {
            res = min(res,((double)(drr[i] - drr[i - k]) / (double)k) - (double)((double)(crr[i] - crr[i - k]) / (double)k * (double)(crr[i] - crr[i - k]) / (double)k));
        }
        if(res < t) return true;
        else return false;
    };
    while(l < r)
    {
        int mid = (l + r) >> 1;
        if(check(mid)) 
        {
            r = mid;
        }
        else l = mid + 1;
    }
    if(l == n + 1) 
    {
        cout << -1 << endl;
        return;
    }    cout << l << endl;
}
signed main()
{
    int t = 1;
    //cin >> t;
    while(t --)
    {
        solve();
    }
}
